package com.ruoyi.web.controller.material;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.MarterialVo;
import com.ruoyi.system.domain.PsnDocVo;
import com.ruoyi.system.domain.RequestParam;
import com.ruoyi.system.domain.ResponseParam;
import com.ruoyi.system.service.SelectBoxService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "采购领用选择框")
@RestController
@RequestMapping("/selectBox")
public class SelectBoxController extends BaseController {

    @Autowired
    private SelectBoxService selectBoxService;


    @ApiOperation("采购的申请类型")
    @PostMapping("/applicationType")
    public AjaxResult getApplicationType() {
        List<ResponseParam> list =  selectBoxService.getApplicationType();
        return AjaxResult.success(list);
    }

//    @ApiOperation("采购的申请部门")
//    @PostMapping("/getSection")
//    public AjaxResult getSection() {
//        List<ResponseParam> list =  selectBoxService.getSection();
//        return AjaxResult.success(list);
//    }

    @ApiOperation("采购的调研总金额范围")
    @PostMapping("/getSurvey")
    public AjaxResult getSurvey() {
        List<ResponseParam> list =  selectBoxService.getSurvey();
        return AjaxResult.success(list);
    }

    @ApiOperation("采购的项目阶段")
    @PostMapping("/getProjectPhase")
    public AjaxResult getProjectPhase() {
        List<ResponseParam> list =  selectBoxService.getProjectPhase();
        return AjaxResult.success(list);
    }

    @ApiOperation("采购的特殊采购的类别")
    @PostMapping("/getSpecialPurchase")
    public AjaxResult getSpecialPurchase() {
        List<ResponseParam> list =  selectBoxService.getSpecialPurchase();
        return AjaxResult.success(list);
    }


    @ApiOperation("采购的是否构成我们产品")
    @PostMapping("/getProductStats")
    public AjaxResult getProductStats() {
        List<ResponseParam> list =  selectBoxService.getProductStats();
        return AjaxResult.success(list);
    }

    @ApiOperation("采购的是否复检")
    @PostMapping("/getRecheck")
    public AjaxResult getRecheck() {
        List<ResponseParam> list =  selectBoxService.getRecheck();
        return AjaxResult.success(list);
    }

    @ApiOperation("采购的选择申请人及部门")
    @PostMapping("/getApplicant")
    public AjaxResult getApplicant() {
        List<PsnDocVo> list =  selectBoxService.getApplicant();
        return AjaxResult.success(list);
    }

    @ApiOperation("库存组织")
    @PostMapping("/getPkOrg")
    public AjaxResult getPkOrg() {
        List<ResponseParam> list =  selectBoxService.getPkOrg();
        return AjaxResult.success(list);
    }

    @ApiOperation("领用的申请类型")
    @PostMapping("/getIcSapplyApplicant")
    public AjaxResult getIcSapplyApplicant() {
        List<ResponseParam> list =  selectBoxService.getIcSapplyApplicant();
        return AjaxResult.success(list);
    }


    @ApiOperation("领用的出库类别")
    @PostMapping("/getIcSapplyType")
    public AjaxResult getIcSapplyType() {
        List<ResponseParam> list =  selectBoxService.getIcSapplyType();
        return AjaxResult.success(list);
    }
}
